POST
/
nous
/
learn
/
models
curl --request POST \
  --url https://api.sophra.org/api/nous/learn/models \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "search-ranking-model-v1",
  "type": "ranking",
  "hyperparameters": {
    "learning_rate": 0.001,
    "batch_size": 32,
    "epochs": 100,
    "optimizer": "adam",
    "hidden_layers": [
      128,
      64,
      32
    ],
    "dropout_rate": 0.2
  },
  "trainingParams": {
    "validation_split": 0.2,
    "early_stopping": {
      "patience": 5,
      "min_delta": 0.001
    },
    "class_weights": {
      "0": 1,
      "1": 2
    }
  }
}'
{
  "success": true,
  "data": {
    "modelId": "<string>",
    "status": "created",
    "config": {}
  }
}

Body

application/json

Response

201 - application/json

Model created successfully

The response is of type object.